{include file='pub/base' /}
<article class="page-container">
		{present name="info.id"}
			<form action="{:url('edit')}" method="post" name="form" id="form">
			<input type="hidden" name="id" value="{$info.id}">
			<input type="hidden" name="status" value="0">
		{else /}
			<form action="{:url('add')}" method="post" name="form" id="form">
		{/present}
		<table class="table table-border table-bordered table-bg">
			<tr>
			<td style='width:75px'>菜单名称</td><td style='width:330px'>
			<input type="text" class="input-text" value="{$info.title ?? ''}" name="title"  datatype="s4-8"   errormsg="4~8位中文！"></td>
			<td style='width:75px'>数据表（table）</td><td>
				<input type="text" class="input-text" value="{$info.name ?? ''}" name="name"  datatype="s4-8"  errormsg="4~8位英文字母！" >
			</td>
			</tr>
			<tr>
			<td style='width:75px'>生成文件：</td><td style='width:330px'>
			 <div class="select-box" style="width: 260px">
                    <select name="file" class="select">
                        <option value="all">默认生成文件（all）</option>
                        <option value="controller">控制器（controller）</option>
                    </select>
                </div>
			</td>
			<td style='width:75px'>生成栏目：</td><td>
				 <div class="select-box" style="width: 260px">
                    <select name="menu" class="select">
                        <option value="0">是</option>
                        <option value="1">否</option>
                    </select>
                </div>	
			</td>
			</tr>
			<tr>
			<td style='width:75px'>挂带审批：</td><td style='width:330px'>
			 <div class="select-box" style="width: 260px">
                    <select name="flow" class="select">
                        <option value="0">挂带审批流</option>
                        <option value="1">无需审批流</option>
                    </select>
                </div>
			</td>
			<td style='width:75px'></td><td>
				
			</td>
			</tr>
		</table>
		
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button  class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button  class="btn btn-default radius" type="button" onclick="layer_close()">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</article>

<script type="text/javascript">
$(function(){
	$("[name='new_top'][value='{$info.new_top ?? ''}']").attr("checked",true);
	$("[name='new_type']").find("[value='{$info.new_type ?? '0'}']").attr("selected",true);
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form").Validform({
            tiptype:function(msg,o,cssctl){
					if (o.type == 3){
						layer.msg(msg, {time: 800}); 
					}
				},
            ajaxPost:true,
            showAllError:true,
            callback:function(ret){
                ajax_progress(ret);
            }
        });
});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>